//
// Default flavors for user ranks
// --------------------------------------------------

.post-rank-flavor(@border, @title) {
  .panel-body {
    border: 2px solid @border;
    border-radius: @panel-border-radius;
    padding: @panel-body-padding - 2px;
  }

  .user-title {
    color: @title;

    a, a:link, a:visited,
    a:focus, a:hover, a:active {
      color: @title;
    }
  }
}

.card-rank-flavor(@border, @title) {
  .panel-body {
    border: 2px solid @border;
    border-radius: @panel-border-radius;
    padding: @panel-body-padding - 2px;
  }

  .user-card-title {
    color: @title;

    a.user-title {
      &, &:link, &:visited,
      &:focus, &:hover, &:active {
        color: @title;
      }
    }
  }
}

.list-group-rank-flavor(@border, @title) {
  border-left: 4px solid @border;
  padding-left: 11px;

  span.rank-name {
    color: @title;
  }

  a.rank-name {
    &, &:link, &:visited,
    &:focus, &:hover, &:active {
      color: @title;
    }
  }
}

.user-profile-rank-flavor(@color) {
  .user-rank {
    color: @color;

    a, a:link, a:visited,
    a:focus, a:hover, a:active {
      color: @color;
    }
  }
}


// Posts
.post-primary {
  .post-rank-flavor(#d1c4e9, #6200ea);
}

.post-success {
  .post-rank-flavor(#c8e6c9, #388e3c);
}

.post-warning {
  .post-rank-flavor(#ffe0b2, #ff6d00);
}

.post-danger {
  .post-rank-flavor(#ffcdd2, #d50000);
}


// Cards
.user-card-primary {
  .card-rank-flavor(#d1c4e9, #6200ea);
}

.user-card-success {
  .card-rank-flavor(#c8e6c9, #388e3c);
}

.user-card-warning {
  .card-rank-flavor(#ffe0b2, #ff6d00);
}

.user-card-danger {
  .card-rank-flavor(#ffcdd2, #d50000);
}


// Posters ranking
.list-group {
  .list-group-rank-primary {
    .list-group-rank-flavor(#d1c4e9, #6200ea);
  }

  .list-group-rank-success {
    .list-group-rank-flavor(#c8e6c9, #388e3c);
  }

  .list-group-rank-warning {
    .list-group-rank-flavor(#ffe0b2, #ff6d00);
  }

  .list-group-rank-danger {
    .list-group-rank-flavor(#ffcdd2, #d50000);
  }
}


// User profiles
.page-header-rank-primary {
  .user-profile-rank-flavor(#6200ea);
}

.page-header-rank-success {
  .user-profile-rank-flavor(#388e3c);
}

.page-header-rank-warning {
  .user-profile-rank-flavor(#ff6d00);
}

.page-header-rank-danger {
  .user-profile-rank-flavor(#d50000);
}